#include <cstdio>
#include <algorithm>
#include <cmath>


/**
 * 
 * 时间复杂度：O(nlogn)
 * 空间复杂度：O(1)
 * 
 * 有趣的跳跃
 * 
 * 
 */
int a[3010], b[3010];
int main() {
	int n;
	scanf("%d", &n);

	for (int i = 0; i < n; i++) {
		scanf("%d", &a[i]);
	}


	for (int i = 0; i < n - 1; i++) {
		b[i] = std::abs(a[i + 1] - a[i]);
	}

	std::sort(b, b + n - 1);

	for (int i = 0; i < n - 2; i++) {
		if (b[i + 1] - b[i] != 1) {
			puts("Not jolly");
			return 0;
		}
	}

	puts("Jolly");

	return 0;
}